<html>
<head><meta charset="utf-8"><title>salsa in chalk · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html">salsa in chalk</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="155114335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/155114335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#155114335">(Jan 14 2019 at 20:32)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I opened <a href="https://github.com/rust-lang-nursery/chalk/issues/201" target="_blank" title="https://github.com/rust-lang-nursery/chalk/issues/201">https://github.com/rust-lang-nursery/chalk/issues/201</a>, let me know if you see anything missing</p>



<a name="155290650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/155290650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#155290650">(Jan 16 2019 at 21:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I went ahead and rebased your salsaify branch after merging in rustfmt</p>



<a name="155292009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/155292009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#155292009">(Jan 16 2019 at 21:59)</a>:</h4>
<p>okay, apparently I keep screwing up this rebase, sorry</p>



<a name="155337322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/155337322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#155337322">(Jan 17 2019 at 14:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span> cool thanks</p>



<a name="155337654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/155337654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#155337654">(Jan 17 2019 at 14:14)</a>:</h4>
<p>OK I landed <a href="https://github.com/rust-lang-nursery/chalk/pull/197" target="_blank" title="https://github.com/rust-lang-nursery/chalk/pull/197">https://github.com/rust-lang-nursery/chalk/pull/197</a>, at least</p>



<a name="156411970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/156411970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#156411970">(Jan 19 2019 at 00:40)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I'm thinking of making <code>solver_choice</code> a global in salsa btw, I can't think of a reason not to at least</p>



<a name="156456030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/156456030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#156456030">(Jan 19 2019 at 23:18)</a>:</h4>
<p>I opened this <a href="https://github.com/rust-lang-nursery/chalk/pull/202" target="_blank" title="https://github.com/rust-lang-nursery/chalk/pull/202">WIP PR</a> with my progress so far</p>



<a name="156456093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/156456093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#156456093">(Jan 19 2019 at 23:20)</a>:</h4>
<p>So now I have an <code>environment</code> query for the whole program</p>



<a name="156456112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/156456112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#156456112">(Jan 19 2019 at 23:20)</a>:</h4>
<p>I'm thinking the next step then is to create a <code>program_clauses_for_trait(def_id)</code> query that gets used in the <code>environment()</code> query</p>



<a name="156456121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/156456121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#156456121">(Jan 19 2019 at 23:21)</a>:</h4>
<p>And then we can cut a branch there for specialization work to pick up</p>



<a name="156456133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/156456133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#156456133">(Jan 19 2019 at 23:21)</a>:</h4>
<p>or <span class="user-mention" data-user-id="116009">@nikomatsakis</span> do we need fine-grained queries besides that for the specialization work?</p>



<a name="156456292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/156456292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#156456292">(Jan 19 2019 at 23:27)</a>:</h4>
<p>it's not clear to me how specialization will decide which traits it needs program clauses for</p>



<a name="156459654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/156459654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#156459654">(Jan 20 2019 at 01:15)</a>:</h4>
<p>(oops, I mean impls, not traits)</p>



<a name="156622810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/156622810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#156622810">(Jan 22 2019 at 17:34)</a>:</h4>
<blockquote>
<p>I'm thinking of making <code>solver_choice</code> a global in salsa btw, I can't think of a reason not to at least</p>
</blockquote>
<p>if we're adopting salsa, it could plausibly be an "input" to the salsa database</p>



<a name="156622863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/156622863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#156622863">(Jan 22 2019 at 17:35)</a>:</h4>
<p>...and you already did that</p>



<a name="156623160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/156623160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#156623160">(Jan 22 2019 at 17:39)</a>:</h4>
<blockquote>
<p>it's not clear to me how specialization will decide which traits it needs program clauses for</p>
</blockquote>
<p>the idea is roughly that we uncover this "dynamically" -- i.e., in order to determine whether an impl A specializes another impl B, we have to test the two predicates, so we need some way to get the rules we need to evaluate the predicates from impl B, which will wind up invoking <code>program_clauses_for_trait</code> for the stuff that appears there etc</p>



<a name="156623172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/156623172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#156623172">(Jan 22 2019 at 17:40)</a>:</h4>
<p>anyway, this branch seems like a good start</p>



<a name="156623219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/salsa%20in%20chalk/near/156623219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/salsa.20in.20chalk.html#156623219">(Jan 22 2019 at 17:40)</a>:</h4>
<p>I feel like just adopting the database is already kind of nice</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>